﻿using Ledict.ConditionExtract.DAL;
using Ledict.ConditionExtract.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ledict.ConditionExtract.BLL
{
    public class SYS_SiftWordBLL
    {
        SYS_SiftWordDAL ssdal = new SYS_SiftWordDAL();

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(SYS_SiftWord model)
        {
            return ssdal.Add(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(string swID)
        {
            return ssdal.Delete(swID);
        }

        /// <summary>
        /// 获取筛除词表数据
        /// </summary>
        /// <param name="ccid">节点信息</param>
        /// <returns></returns>
        public DataTable GetSiftWord()
        {
            return ssdal.GetSiftWord();
        }

        /// <summary>
        /// 查询是否存在筛除词
        /// </summary>
        /// <param name="word"></param>
        /// <returns></returns>
        public int GetSiftWordByWord(string word)
        {
            return ssdal.GetSiftWordByWord(word);
        }

        /// <summary>
        /// 修改筛除词
        /// </summary>
        public bool UpdateName(SYS_SiftWord model)
        {
            return ssdal.UpdateName(model);
        }
    }
}
